		<div class="cart-display">
			<h2 class="smart" style="margin-top:0;font-size:18px"><?php echo $this->__('Shopping Cart');?></h2>
			<?php App::Component('appStore')->Helper('Data')->renderShoppingCart();?>
		</div>
		<?php
				echo App::Helper("Javascript")
						->validation_map(
										  Array(
												  '_errBg'=>ERROR_BACKGROUND,
												  '_dflBg'=>'#CFCFCF',
												  '_autoSubmit'=>'false',
												  '_errorMark'=>'inline',
												  '_errToolTips'=>'false'
												)
										 );
				echo App::Helper("Javascript")
						->ajax_submit(
										Array(
												 "form_name"=>"#post-checkout",
												 "debug"=>"true",
												 "auto_hide"=>"true",
												 "message_element"=>".message"
											 )
									 );
		?>
		<div class="checkout">
			<form method="post" class="app_form app_validation" id="post-checkout" action="<?php echo $this->baseurl("/appstore/completeCheckout") ?>">
			<div class="additionals" style="margin:10px 10px;background:#FFF;padding:10px">
				<?php if(  App::Helper('Config')->siteInfo('appstore_next_delivery') == 'Yes'):?>
					<input type="checkbox" value="Yes" name="data[Additional][nextdaydalivery]" /> <strong style="font-size:18px;font-weight:normal">Express Delivery 2-3 Days $<?php echo  App::Helper('Config')->siteInfo('appstore_next_delivery_cost'); ?></strong>
					<p><?php echo $this->__('Please note that Express Delivery is only offered for US destinations.  Orders are guaranteed to be shipped within 24 hours (except Sundays) and at your door within 3 business days');?></p>     
				<?php endif;?>
				<?php if(  App::Helper('Config')->siteInfo('appstore_signature') == 'Yes'):?>
				<input type="checkbox" value="Yes" name="data[Additional][signature]" /> <strong  style="font-size:18px;font-weight:normal">Add a Signature for just $<?php echo  App::Helper('Config')->siteInfo('appstore_signature_cost'); ?></strong>
				<?php endif;?>
			</div>
			<div >
				<div class="app-tab">
                 
				
                    
					<table>
                    <tr>
                        <td>
                	<ul class="app-tab-head" style="display:block">
						
						<li class="tab"><a href="javascript:void(0)">Shipping Address</a></li>
					</ul>            
                        </td>
                        <td>
                        	<ul class="app-tab-head" style="display:block">
						<li class="tab tab-selected"><a href="javascript:void(0)">Billing Address</a></li>
						
					</ul>
                        </td>
                    </tr>
                    <tr>
                        <td>
                        <?php
							App::Module("DataGrid")->clear()
												   ->setDisplay('FormListing')
												   ->addRow($this->__("First Name"),App::Load("Helper/Html")->inputTag("data[Billing][fname]","",array("class"=>"input-small check_notdefault",'id'=>'f_name','longdesc'=>'Please enter your first name')) )
												   ->addRow($this->__("Last Name"),App::Load("Helper/Html")->inputTag("data[Billing][lname]","",array("class"=>"input-small check_notdefault",'id'=>'l_name','longdesc'=>'Please enter your last name')) )
												   ->addRow($this->__("Address line 1"),App::Load("Helper/Html")->inputTag("data[Billing][address_line_1]","",array("class"=>"input-small check_notdefault",'id'=>'address_line_1','longdesc'=>'Please enter your address line 1')) )
												   ->addRow($this->__("Address line 2"),App::Load("Helper/Html")->inputTag("data[Billing][address_line_2]","",array("class"=>"input-small",'id'=>'address_line_2')) )
												   ->addRow($this->__("City/Town"),App::Load("Helper/Html")->inputTag("data[Billing][city]","",array("class"=>"input-small check_notdefault",'id'=>'city','longdesc'=>'Please enter your city/town name')) )
												   ->addRow($this->__("State/Province"),App::Load("Helper/Html")->inputTag("data[Billing][state]","",array("class"=>"input-small check_notdefault",'id'=>'state','longdesc'=>'Please enter your State/Province name')) )
												   ->addRow($this->__("Postal/Zip Code"),App::Load("Helper/Html")->inputTag("data[Billing][zipcode]","",array("class"=>"input-small check_notdefault",'id'=>'zipcode','longdesc'=>'Please enter your Postal/Zip Code')) )
												   ->addRow($this->__("Country"), App::Load("Helper/Html")->countryTag("data[Billing][country]","US",array("id" => "country","class"=>"select check_notempty",'longdesc'=>'Please select your country')) )
												   ->addRow($this->__("Email"),App::Load("Helper/Html")->inputTag("data[Billing][email]","",array("class"=>"input-small check_email",'id'=>'email')) )
												   ->Render();
						?>
						</td><td id="sad">
                        <?php
							App::Module("DataGrid")->clear()
												   ->setDisplay('FormListing')
												   ->addRow($this->__("First Name"),App::Load("Helper/Html")->inputTag("data[Shipping][fname]","",array("class"=>"input-small check_notdefault",'id'=>'f_name_s','longdesc'=>'Please enter your first name')) )
												   ->addRow($this->__("Last Name"),App::Load("Helper/Html")->inputTag("data[Shipping][lname]","",array("class"=>"input-small check_notdefault",'id'=>'l_name_s','longdesc'=>'Please enter your last name')) )
												   ->addRow($this->__("Address line 1"),App::Load("Helper/Html")->inputTag("data[Shipping][address_line_1]","",array("class"=>"input-small check_notdefault",'id'=>'address_line_1_s','longdesc'=>'Please enter your address line 1')) )
												   ->addRow($this->__("Address line 2"),App::Load("Helper/Html")->inputTag("data[Shipping][address_line_2]","",array("class"=>"input-small",'id'=>'address_line_2_s')) )
												   ->addRow($this->__("City/Town"),App::Load("Helper/Html")->inputTag("data[Shipping][city]","",array("class"=>"input-small check_notdefault",'id'=>'city_s','longdesc'=>'Please enter your city/town name')) )
												   ->addRow($this->__("State/Province"),App::Load("Helper/Html")->inputTag("data[Shipping][state]","",array("class"=>"input-small check_notdefault",'id'=>'state_s','longdesc'=>'Please enter your State/Province name')) )
												   ->addRow($this->__("Postal/Zip Code"),App::Load("Helper/Html")->inputTag("data[Shipping][zipcode]","",array("class"=>"input-small check_notdefault",'id'=>'zipcode_s','longdesc'=>'Please enter your Postal/Zip Code')) )
												   ->addRow($this->__("Country"), App::Load("Helper/Html")->countryTag("data[Shipping][country]","US",array("id" => "country_s","class"=>"select ",'longdesc'=>'Please select your country')) )
												   ->addRow($this->__("Email"),App::Load("Helper/Html")->inputTag("data[Shipping][email]","",array("class"=>"input-small check_email",'id'=>'email_s')) )
												   ->Render();
						?></td><tr></table>
					<div style="padding:10px;margin:5px 10px;background:#D9E5EE">
						<input name="data[Checkout][shiptobillingaddress]" id="shiptobillingaddress"  onclick="
                        if(this.checked){
                        $$('#f_name_s').set('value',$$('#f_name').get('value'));
                        $$('#l_name_s').set('value', $$('#l_name').get('value'));
                        $$('#address_line_1_s').set('value', $$('#address_line_1').get('value'));
                        $$('#address_line_2_s').set('value', $$('#address_line_2').get('value'));
                        $$('#city_s').set('value', $$('#city').get('value'));
                        $$('#state_s').set('value', $$('#state').get('value'));
                        $$('#zipcode_s').set('value', $$('#zipcode').get('value'));
                        $$('#email_s').set('value', $$('#email').get('value'));
                        }
   
                        " type="checkbox" value="Yes" /> Ship in same billing address</div>
				</div>
				<br class="clearboth" />
			</div>
			<div >
				<h2 class="smart" style="margin-top:0;font-size:18px"><?php echo $this->__("Payment Method");?></h2>
				<p><div class="inner message"></div></p>
				<p><?php echo $this->__("Select a payment method");?></p>
				<div class="inner"><?php echo App::Component('appStore')->Helper('Pgateway_Render')->renderPaymentMethods();?></div>
				<p><input type="submit" value="Continue Checkout" name="data[Payment][submit]" class="button" /></p>
			</div>
			</form>
		</div>